<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>p2p网贷平台</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="css/common.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/user.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.css"/>
<script type="text/javascript" src="script/jquery.min.js"></script>
<script type="text/javascript" src="script/common.js"></script>
<script src="script/user.js" type="text/javascript"></script>
</head>
<body>
<header>
  <!--#include virtual="wbtop.html"-->
</header>
<!--个人中心-->
<div class="wrapper wbgcolor">
  <div class="w1200 personal">
    <div class="credit-ad"><img src="images/clist1.jpg" width="1200" height="96"></div>
    <div id="personal-left" class="personal-left">
      <ul>
        <li class="pleft-cur"><span><a href="个人中心首页.html"><i class="dot dot1"></i>账户总览</a></span></li>
        <li><span><a style="font-size:14px;text-align:center;width:115px;padding-right:35px;" href="个人中心-资金记录 .html">资金记录</a></span></li>
        <li><span><a style="font-size:14px;text-align:center;width:115px;padding-right:35px;" href="个人中心-投资记录.html">投资记录</a></span></li>
        <li><span><a style="font-size:14px;text-align:center;width:115px;padding-right:35px;" href="个人中心-回款计划.html">回款计划</a></span></li>
        <li><span><a style="font-size:14px;text-align:center;width:115px;padding-right:35px;" href="个人中心-还款计划.html">还款计划</a></span></li>
        <li class=""><span><a href="个人中心-开通第三方1.html"><i class="dot dot02"></i>开通第三方</a> </span> </li>
        <li><span><a href="个人中心-充值1.html"><i class="dot dot03"></i>充值</a></span></li>
        <li class=""><span><a href="个人中心-提现1.html"><i class="dot dot04"></i>提现</a></span></li>
        <li style="position:relative;" class=""> <span> <a href="个人中心-我的红包.html"> <i class="dot dot06"></i> 我的红包 </a> </span> </li>
        <li class=""><span><a style="font-size:14px;text-align:center;width:115px;padding-right:35px;" href="个人中心-兑换历史.html">兑换历史</a></span></li>
        <li style="position:relative;"> <span> <a href="个人中心-系统消息.html"><i class="dot dot08"></i>系统信息 </a> </span> </li>
        <li><span><a href="个人中心-账户设置.html"><i class="dot dot09"></i>账户设置</a></span></li>
      </ul>
    </div>
    <label id="typeValue" style="display:none;"> </label>
    <script>
		//<![CDATA[
			function showSpan(op){
				$("body").append("<div id='mask'></div>");
				$("#mask").addClass("mask").css("display","block");

				$("#"+op).css("display","block");
			}

			function displaySpan(op){
				$("#mask").css("display","none");
				$("#"+op).css("display","none");
			}
		//]]>
		</script>
    <script type="text/javascript">
		//<![CDATA[
		// 	function checkActualMoney()
		// 	{
		// 		var actualMoney=Number($("#form\\:actualMoney").val());
		// 		var actualMessage=$("#actualMoney_message");
		// 		var nullFlag=actualMoney=="";
		// 		if(nullFlag==true)
		// 		{
		// 			$(actualMessage).text("请输入您要提现的金额");
		// 			$(actualMessage).show();
		// 			return false;
		// 		}
		// 		else
		// 		{
		// 			$(actualMessage).hide();
		// 		}
		// 		var numberFlag=isNaN(actualMoney);
		// 		if(numberFlag==true)
		// 		{
		// 			$(actualMessage).text("提现金额必须大于0.00 元，单笔不超过50 万");
		// 			$(actualMessage).show();
		// 			return false;
		// 		}
		// 		else
		// 		{
		// 			$(actualMessage).hide();
		// 		}
		// 		var legalFlag1=actualMoney>0;
		// 		var legalFlag2=actualMoney<=500000;
		// 		if(!legalFlag1||!legalFlag2)
		// 		{
		// 			$(actualMessage).text("提现金额必须大于2.00 元，单笔不超过50 万");
		// 			$(actualMessage).show();
		// 			return false;
		// 		}
		// 		else
		// 		{
		// 			$(actualMessage).hide();
		// 		}
		// 		//提现金额小数位
		// 		var legalRegex="^(([1-9]+[0-9]*)|((([1-9]+[0-9]*)|0)\\.[0-9]{1,2}))$";
		// 		var legalPattern=new RegExp(legalRegex);
		// 		var legalFlag3=legalPattern.test(actualMoney);
		// 		if(!legalFlag3)
		// 		{
		// 			$(actualMessage).text("小数位最多两位!");
		// 			$(actualMessage).show();
		// 			return false;
		// 		}
		// 		else
		// 		{
		// 			$(actualMessage).hide();
		// 		}
		// 		var balance=Number("0.0");
		// 		//提现金额小于余额
		// 		var legalFlag=(actualMoney-balance).toFixed(2)<=0;
		// 		if(!legalFlag)
		// 		{
		// 			$(actualMessage).text("余额不足");
		// 			$(actualMessage).show();
		// 			return false;
		// 		}
		// 		else
		// 		{
		// 			$(actualMessage).hide();
		// 		}
		// 		return true;
		// 	}

			function amount(th){
			    var regStrs = [
			        ['^0(\\d+)$', '$1'], //禁止录入整数部分两位以上，但首位为0
			        ['[^\\d\\.]+$', ''], //禁止录入任何非数字和点
			        ['\\.(\\d?)\\.+', '.$1'], //禁止录入两个以上的点
			        ['^(\\d+\\.\\d{2}).+', '$1'] //禁止录入小数点后两位以上
			    ];
			    for(i=0; i<regStrs.length; i++){
			        var reg = new RegExp(regStrs[i][0]);
			        th.value = th.value.replace(reg, regStrs[i][1]);
			    }
			    if(th.value>500000){
			    	th.value = th.value.substr(0,th.value.length-1);
			    }
			}
			//]]>
		</script>
    <div class="personal-main">
      <div class="personal-deposit" id="app">
        {{user}}
        <h3><i>提现</i></h3>
<!--        <form id="form" name="form" method="post" action="/user/withdraw" enctype="application/x-www-form-urlencoded" target="_blank">-->
<!--        <form id="form"  target="_blank">-->
          <input type="hidden" name="form" value="form">
          <div class="deposit-form" style="margin-top:0px;border-top:0px none;">
            <h6>填写提现金额</h6>
            <ul>
              <li> <span class="deposit-formleft">可用金额</span> <span class="deposit-formright"> <i>
                <label id="form:blance">{{allmoney}}</label>
                </i>元 </span> </li>
              <li> <span class="deposit-formleft">提现金额</span> <span class="deposit-formright">
<!--                <input v-model="txmoney"   id="form:actualMoney" type="text" name="form:actualMoney" class="deposite-txt" maxlength="10">-->
                <input @blur="yz()" class="deposite-txt" type="text" v-model="txmoney" >
                元 </span> <span id="actualMoneyErrorDiv"><span id="actualMoney_message" style="display:none" class="error"></span></span> </li>
              <li> <span class="deposit-formleft">提现费用</span> <em id="txfy" class="markicon fl"></em> <span class="deposit-formright deposit-formright1"> <i>
                <label id="form:fee" > {{txmoney*0.001}}</label>
                </i>元 </span> <span class="txarrow-show">提现金额的0.1%，最低不低于2元，最高100元封顶</span><span class="txicon-show"></span> </li>
              <li><span class="deposit-formleft">实际到账金额</span> <em id="dzje" class="markicon fl"></em> <span class="deposit-formright deposit-formright1"> <i>
                <label id="form:cashFine"> {{txmoney*0.999}}</label>
                </i> 元</span> <span class="dzarrow-show">提现金额 - 提现费用</span><span class="dzicon-show"></span> </li>
              <li>
<!--                <input type="submit" name="form:j_idt78" value="提111现" class="btn-depositok" :disabled="show" onclick="return checkActualMoney()">-->
<!--                <span style="width: 500px"></span>-->
                <button :disabled="show" @click="totixian()" style="color: red;width: 100px;height: 100px;background-color: deepskyblue" >提现</button>
              </li>
            </ul>
          </div>
<!--        </form>-->
        <div class="deposit-tip"> 温馨提示：<br>
          1、用户需在完成身份认证、开通丰付托管账户并绑定银行卡后，方可申请提现；<br>
          2、请务必在提现时使用持卡人与身份认证一致的银行卡号，且确保填写信息准确无误；<br>
          3、工作日当天16:00前提交的提现申请将在当天处理，默认为T+1到账；<br>
          4、提现金额单笔上限为50万元，单日累计总额不可超过100万元；<br>
          5、提现手续费为提现金额的0.1%，最低每笔2元，100元封顶，手续费由第三方托管账户收取，用户自行承担。<br>
        </div>
      </div>
    </div>
    <script type="text/javascript">
			$("#form\\:actualMoney").focus(
					   function(){
						   	$(this).css({"font-size":"24px","font-weight":"bold","font-family":"Arial","border":"1px solid #0caffe"});
						   if($("#form\\:actualMoney").val() == value) {
							   	$("#form\\:actualMoney").val("")
								$(this).css({"font-size":"24px","font-weight":"bold","font-family":"Arial"});
						   }
						}).blur(
						function(){
						   $(this).css("border","1px solid #D0D0D0");
						   if($("#form\\:actualMoney").val() == "") {
							  	$(this).css({"color":"#D0D0D0","font-size":"14px","font-weight":"normal"});
					}
				})

				function keyUpcheck()
				{
					$(this).css({"font-size":"24px","font-weight":"bold","font-family":"Arial"});
				}
			</script>
    <div class="clear"></div>
  </div>
</div>
<!--网站底部-->
<div id="footer" class="ft">
  <div class="ft-inner clearfix">
    <div class="ft-helper clearfix">
      <dl>
        <dt>关于我们</dt>
        <dd><a href="公司简介.html">公司简介</a><a href="管理团队.html">管理团队</a><a href="网站公告.html">网站公告</a></dd>
      </dl>
      <dl>
        <dt>相关业务</dt>
        <dd><a href="list.html">我要投资</a><a href="我要借款.html">我要借款</a></dd>
      </dl>
      <dl>
        <dt>帮助中心</dt>
        <dd><a href="帮助中心.html">新手入门</a><a href="个人中心首页.html">我的账户</a><a href="list.html">债权转让</a></dd>
      </dl>
      <dl>
        <dt>联系我们</dt>
        <dd><a href="联系我们.html">联系我们</a></dd>
      </dl>
    </div>
    <div class="ft-service">
      <dl>
        <dd>
          <p><strong>400-660-1268</strong><br>
            工作日 9:00-22:00<br>
            官方交流群:<em>12345678</em><br>
            工作日 9:00-22:00 / 周六 9:00-18:00<br>
          </p>
          <div class="ft-serv-handle clearfix"><a class="icon-hdSprite icon-ft-sina a-move a-moveHover" title="亿人宝新浪微博" target="_blank" href="#"></a><a class="icon-hdSprite icon-ft-qqweibo a-move a-moveHover" title="亿人宝腾讯微博" target="_blank" href="#"></a><a class="icon-ft-qun a-move a-moveHover" title="亿人宝QQ群" target="_blank" href="#"></a><a class="icon-hdSprite icon-ft-email a-move a-moveHover mrn" title="阳光易贷email" target="_blank" href="mailto:xz@yirenbao.com"></a></div>
        </dd>
      </dl>
    </div>
    <div class="ft-wap clearfix">
      <dl>
        <dt>官方二维码</dt>
        <dd><span class="icon-ft-erweima"><img src="images/code.png" style="display: inline;"></span></dd>
      </dl>
    </div>
  </div>
  <div class="ft-record">
    <div class="ft-approve clearfix"><a class="icon-approve approve-0 fadeIn-2s" target="_blank" href="#"></a><a class="icon-approve approve-1 fadeIn-2s" target="_blank" href="#"></a><a class="icon-approve approve-2 fadeIn-2s" target="_blank" href="#"></a><a class="icon-approve approve-3 fadeIn-2s" target="_blank" href="#"></a></div>
    <div class="ft-identity">©2015 亿人宝 All rights reserved&nbsp;&nbsp;&nbsp;<span class="color-e6">|</span>&nbsp;&nbsp;&nbsp;安徽省亿人宝投资管理有限公司&nbsp;&nbsp;&nbsp;<span class="color-e6">|</span>&nbsp;&nbsp;&nbsp;<a target="_blank" href="http://www.miitbeian.gov.cn/">皖ICP备12345678号-1</a></div>
  </div>
</div>
<script src="script/jquery.datetimepicker.js" type="text/javascript"></script>
<script src="script/datepicker.js" type="text/javascript"></script>
</body>

<script src="script/jquery.datetimepicker.js" type="text/javascript"></script>
<script src="script/datepicker.js" type="text/javascript"></script>
<script type="text/javascript" src="script/md5.js"></script>
<script src="script/vue.js"></script>
<script src="script/axios.min.js"></script>
<script src="script/moment.js"></script>
<script>
  new Vue({
    el:"#app",
    data(){
      return{
        show:false,//控制按钮
        txmoney:0,//提现金额
        allmoney:{},//当前用户的余额
        user:{},//当前登录用户
        type:{},//登录用户的类型
        obj:{}
      }
    },
    methods:{
      totixian:function(){//提现金额并且生成历史记录    参数==》金额 用户id
        // alert(1)
        this.obj.amount = this.txmoney//金额
        this.obj.userType = this.type//用户类型
        this.obj.userId = this.user.id//用户id
        this.obj.txfy = this.txmoney*0.001//提现费用
        axios.post("/api/finance-service-user/accountlog/totixian",this.obj).then((res)=>{
          // alert(1)
          if(res.data.success){
            alert(res.data.message);
            location.reload();
          }else{
            alert(res.data.message);
          }
        })

      },
      yz:function(){//提现金额验证
        if(this.txmoney>this.allmoney){
          this.show = true;
          // alert("输入金额不合理")
        }else {
          this.show = false;
          // alert("输入金额合理")
        }
      },
      findallmoney:function () {//计算出当前用户的余额
        axios.post("/api/finance-service-user/accountlog/findallmoney/"+this.user.id).then((res)=>{
                  if(res.data.success){
                    this.allmoney = res.data.result;

                  }else{
                    alert(res.data.message);
                  }
        }
        );
      }
    },
    mounted(){
      this.user=JSON.parse(sessionStorage.getItem("cususer"));//当前登录用户
      this.type=sessionStorage.getItem("type");//用户类型
      this.findallmoney();
    }
  });
</script>

</html>
